home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
games
/
egavga
/
dcg303xa.arj
/
CIVILIAN.SCR
< prev
next >
Wrap
Text File
|
1993-06-27
|
2KB
|
83 lines
!
! Default civilian script..
!
! (c) DC Software, 1992
!
! Pending Enhancements
!
! - This script has no voices. For an example of voices, look at
! MERCHANT.SCR and HEALER.SCR
!
!------------------------------------------------------------------------!
:@TALK ! Talk to the character !
!------------------------------------------------------------------------!
if player.hp = 0 then
writeln( player.name, " is dead!" );
STOP;
endif;
if npc.picture >= 0 then
viewpcx(npc);
endif;
! First, say hello.. !
if NPC.V0 > 0 then
writeln( "Hello ", player.name, ". What brings you back?" );
else
writeln( "Hello. I am ", npc.name, ". How may I help you?" );
endif;
! Now, set some variables..
NPC.V0 = 1; ! From know on, remember we've been here
:LOOP
L3 = getstr("Name","Job","Join","Bye");
if L3 = -1 then
writeln( "Ok." );
goto XSTOP;
endif;
! First, see if the keyword typed is in the character's text block !
if dotext( S0 ) then
if L3 = 3 goto XSTOP;
goto LOOP;
endif;
! It didn't, so try the predefined ones..
on L3 goto CNAME, CJOB, CJOIN, CSTOP;
! Nope, try a 'DEFAULT' line
if not dotext( "DEFAULT" ) then
writeln( "I don't know anything about that!" );
endif;
goto LOOP;
:CNAME
writeln( "My name is ", NPC.name, "." );
GOTO LOOP;
:CJOB
writeln( "I am a ", npc.type );
GOTO LOOP;
:CJOIN
writeln( "I'm too busy. Sorry." );
GOTO LOOP;
:CSTOP
writeln( "Nice talking to you.." );
goto XSTOP;
! Feel free to expand on this list.. !
!-----------------------------------------------------------------!
! All STOPs now lead here so the screen can be restored if needed !
!-----------------------------------------------------------------!
:XSTOP
if npc.picture >= 0 then
paint(window); ! Assumes the picture fits in the window !
endif;
STOP;